1. Field of the Invention
The present disclosure relates generally to packet network devices such as switches that are configured in a stacked relationship to each other and which are configured to support a link aggregation group. This disclosure relates more particularly to methods for selecting a egress port to use for network traffic switched through the stacked switch over the link aggregation group.
2. Description of Related Art
Single chassis packet switches can only support a limited number of line cards and ports. Some vendors provide special link cards or “back-end” ports that can be used to connect or stack two or more separate switches together to form a stacked system that in at least some ways acts with peer devices like a single larger chassis. U.S. patent application Ser. No. 12/828,514 entitled “Multiple Chassis Stacking using Front-End Ports” which was filed Jul. 1, 2010 and assigned to Force 10 Networks, Inc. describes a method and apparatus for creating a single, logical chassis out of two or more physical chassis, linked through their front-end traffic ports. A stacking link with enough member ports to support anticipated cross-platform traffic is set up between the two or more chassis, and route processing managers on the two or more chassis negotiate to determine a stack master. The stack master configures line cards on each chassis for appropriate behavior in each traffic situation, as is described in the application. Such behavior generally uses the same types of lookup and forwarding operations employed in a single-chassis operation, but with instructions that vary, sometimes per line card, depending on the ingress and egress chassis of a packet. One motivation for connecting two or more network switches in a stacked switch configuration can be to increase the number of ports that can be controlled by a single management/control plane. From the perspective of the packet network, the stacked switches operate as a single, logical switch.
Link aggregation refers to a process for operating a group of physical links as if they were a single link. At least one standard for link aggregation has been promulgated by the Institute of Electrical and Electronic Engineers, e.g., in the IEEE 802.1AX-2008 standard, incorporated herein by reference. There are a number of motivations for implementing Link Aggregation on network switches, one of which is to increase link bandwidth by combining the capacity of multiple physical links together into one logical link.
FIG. 1 is a diagram showing eight network switches, SW0-SW7, configured in a stacked relationship to each other to form a single stacked switch 100. Depending upon the stacking configuration, each one of the eight switches can be connected to one or more other of the switches by a stacking link (SL0-SL7). If the switches comprising the stacked switch 100 are configured in a daisy-chain topology, then all but two of the switches comprising the stacked switch SWn are connected by single stacking links to two other switches. The remaining two switches are only connected by a single stacking link to one other switch. On the other hand, if the switches comprising the stacked switch 100 are configured in a ring topology, then each of the switches in the stacked switch 100 are connected by stacking links to two other switches comprising the stacked switch 100.
The stacked switch 100 in FIG. 1 can be configured to support one or more link aggregation groups (LAG) such as LAG 101. The LAG 101 includes eight member ports, with there being only one member port of the LAG residing on each switch SW0-SW7 comprising the stacked switch 100. Each of the LAG member ports on the switches SW0-SW7 are connected to a single switch 110 over links L8-L15. In operation, data in the form of a frame of information can ingress to any one of the switches comprising the stacked switch 100, be processed by the switch and egress from the same switch as it arrived on or on a different switch over the LAG 101 to the switch 110. Assuming that each of the paths between the stacked switch 100 and the single switch 110 are equal cost paths, then any member port on any one of the stacked switches SW0-SW7 can be selected as the port on which the data egresses the stacked switch. Equal cost multipath (ECMP) routing techniques are well known that employ various hash algorithms to select egress ports over which to forward the data.
A hash algorithm operating in conjunction with the ECMP routing technique calculates how to forward data ingressing to the stacked switch 100 over the LAG 101 such that the data is evenly distributed for transmission over each of the member ports of the LAG 101. In a stacked switch configuration, such as the switch 101, this can result in the sub-optimal use of stacking link bandwidth. For example, in the case where data ingresses to switch 1 of the stacked switch 100, and is scheduled to egress the stacked switch over a port on switch 5 (SW5), this data crosses four stacking links, SL1, SL2, SL3 and SL4. Typically, data ingressing to other switches comprising the stacked switch 100 can be scheduled for transmission over these same stacking links. Depending upon the bandwidth limitations of these stacking links, it is possible that the links can be overwhelmed by the network traffic flowing through the stacking switch 100, which can result in some of the data being dropped.
Summary: In light of the forgoing limitations to the bandwidth available on stacking links connecting two or more switches in a stacked switch configuration, it would be beneficial to distribute data ingressing to any of the switches comprising the stacking switch to LAG port members in a manner that optimizes the available stacking link bandwidth. In one embodiment, the bandwidth limitations imposed by stacking links on a stacked switch comprised of two or more individual switches connected to each in a ring or daisy chain topology are mitigated in a method that includes compiling a list of values associated with the relative cost to forward network data through a stacked switch, calculating a hash value on network data received at a stacked switch for egress over a link aggregation group configured on the stacked switch and using these values to identify a switch comprising the stacked switch over which to the network data egresses, and if the calculated hash value is greater than a minimum compiled relative cost value, calculating one or more reduced relative cost values, and transmitting the network data over an egress port that is associated with one of the reduced relative cost values if the egress port is a member or the link aggregation group.